package com.yuexun.dhdoctor.module.mythings.model.impl;



import com.yuexun.dhdoctor.module.mythings.api.ThingApi;
import com.yuexun.dhdoctor.module.mythings.bean.TaskData;
import com.yuexun.dhdoctor.module.mythings.model.IThingDetailModel;
import com.yuexun.dhdoctor.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by work-jx on 2016/8/31.
 */
public class ThingDetailModel implements IThingDetailModel {
    private ThingApi api;

    //记录Log
//    private final Logger log = ProUtil.getLogger(LoginModel.class);

    public ThingApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(ThingApi.class);
        }
    }

    @Override
    public Observable<TaskData> getTaskDetailDatas(Map<String, String> praise) {
        api = ApiInstance();
        return api.getTaskDetailDatas(praise);
    }

}
